- id = dom_id(@group)

- if @group.errors.empty?
  $('##{id}').replaceWith('#{ j render(partial: "group", collection: [ @group ]) }')
  $('##{id}').effect("highlight", { duration:1000 });
- else
  $('##{id}').html('#{j render(partial: "edit") }')
  $('#group_name').focus()
